package com.coderman.daotest.dao;

import com.coderman.daoclient.dao.impl.IDaoImpl;
import com.coderman.daotest.csdn.bean.CsdnUserEntity;
import org.apache.commons.io.FileUtils;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Created by 58-daojia on 2017-12-16.
 *
 * @author: fanchunshuai
 * @version: V1.0
 * @Desc:
 * @Copyright (c) 2017 58到家-版权所有
 */
public class IDaoImplTest3 {
    static IDaoImpl<CsdnUserEntity,Long> dao = new IDaoImpl<CsdnUserEntity,Long>();

    public static void main(String[] args) {
       /* try {
            Map<String,String> map = dao.getMap(CsdnUserEntity.class,"user_name","id");
            System.out.println(map.size()+"-----------------------sssssssssss");
        } catch (Exception e) {
            e.printStackTrace();
        }*/


        try {
            List<CsdnUserEntity> csdnUserEntities = dao.getList(CsdnUserEntity.class,"select * from csdn_user limit 0,100");
            for (CsdnUserEntity csdnUserEntity : csdnUserEntities){
                System.out.println(csdnUserEntity.toString());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
